package com.jjkj.environmental.environmental.adapter

import android.support.annotation.LayoutRes
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.jjkj.environmental.environmental.R
import com.jjkj.environmental.environmental.bean.model.CarInfo
import com.jjkj.environmental.environmental.utils.Setting

class MainAdapter(@LayoutRes layoutResId: Int) : BaseQuickAdapter<CarInfo, BaseViewHolder>(layoutResId) {


    override fun convert(helper: BaseViewHolder?, item: CarInfo?) {
        helper!!.setText(R.id.tv_customer_name, "车主姓名:${item!!.czmc}")
        helper.setText(R.id.tv_serial_number, "检测序列号:${item.cljcrlsh}")
        helper.setText(R.id.tv_license_plate_type, "号牌种类:${Setting.LICENSE_PLATE_TYPE[item.hpzl]}")
        helper.setText(R.id.tv_license_number, "号牌号码:${item.hphm}")
        helper.setText(R.id.tv_engine_number, "发动机编码:${item.fdjbh}")
        helper.setText(R.id.tv_vin_number, "VIN编号:${item.cjh}")
    }
}